import request from '@/config/axios'

export interface WordManagerVO {
                    id: number
                    content: string
                    author: string
                    source: string
                    title: string
                    pushTime: Date
}

// 查询运营中心文章管理列表
export const getWordManagerPage = async (params) => {
  return await request.get({ url: '/pro/word-manager/page', params })
}

// 查询运营中心文章管理详情
export const getWordManager = async (id: number) => {
  return await request.get({ url: '/pro/word-manager/get?id=' + id })
}

// 新增运营中心文章管理
export const createWordManager = async (data: WordManagerVO) => {
  return await request.post({ url: '/pro/word-manager/create', data })
}

// 修改运营中心文章管理
export const updateWordManager = async (data: WordManagerVO) => {
  return await request.put({ url: '/pro/word-manager/update', data })
}

// 删除运营中心文章管理
export const deleteWordManager = async (id: number) => {
  return await request.delete({ url: '/pro/word-manager/delete?id=' + id })
}

// 导出运营中心文章管理 Excel
export const exportWordManagerApi = async (params) => {
  return await request.download({ url: '/pro/word-manager/export-excel', params })
}